﻿using ThresholdAssistant.ConfigSdk;

namespace ThresholdAssistant.WebAPI.Models.Constants
{
    /// <summary>
    /// 配置信息
    /// </summary>
    public sealed class AppSettingConstant
    {
        /// <summary>
        /// 微信授权登录配置
        /// </summary>
        public static WechatAuthLoginGonfig WechatAuthLoginGonfig => ConfigUtil.GetValue<WechatAuthLoginGonfig>("WechatAuthLoginGonfig");

        /// <summary>
        /// 图片域名
        /// </summary>
        public static string HostImgUrl => ConfigUtil.GetValue<string>("HostImgUrl");

        /// <summary>
        /// 图片保存路径
        /// </summary>
        public static string ImgSavePath => ConfigUtil.GetValue<string>("ImgSavePath");

        /// <summary>
        /// 文件删除口令
        /// </summary>
        public static string DelImgUrlToken => ConfigUtil.GetValue<string>("DelImgUrlToken");

        /// <summary>
        /// 群成员限制数量
        /// </summary>
        public static int GroupMemberLimitCount => ConfigUtil.GetValue<int>("GroupMemberLimitCount") == 0 ? 5 : ConfigUtil.GetValue<int>("GroupMemberLimitCount");

        /// <summary>
        /// 互亿短信配置
        /// </summary>
        public static HuyiSmsConfig HuyiSmsConfig => ConfigUtil.GetValue<HuyiSmsConfig>("HuyiSmsConfig");

        /// <summary>
        /// 互亿语音配置
        /// </summary>
        public static HuyiVoiceConfig HuyiVoiceConfig => ConfigUtil.GetValue<HuyiVoiceConfig>("HuyiVoiceConfig");

        /// <summary>
        /// 阈值读取服务器路径
        /// </summary>
        public static string ThresholdServicePath => ConfigUtil.GetValue<string>("ThresholdServicePath");
    }
}